<?php
namespace app\admin\controller;

use cmf\controller\AdminBaseController;
use think\Validate;
use think\Db;
use app\user\model\PluginWechatUserModel;
class WechatController extends AdminBaseController
{
/*
    	*关注微信公众号的用户
    */
    public function wechatlist()
    {
      	$userinfo=Db::name('plugin_wechat_user')->where('status',1)->select();
      	//echo "<pre>";var_dump($userinfo);die;
    	return $this->fetch('Wechat/index',[
        	'userinfo'=>$userinfo
        ]);
    }
  	/*
    	*删除用户
    */
	public function WechatDelete()
    {
    	  $data = $this->request->param();
    	  $res=Db::name('plugin_wechat_user')->where('id',$data['id'])->delete();
    	  if($res=='1'){
    	  	 $this->success('删除成功');
    	  }else{
    	  	 $this->error('删除失败');
    	  }
    	  
    }

}

